<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/30
 * Time: 14:15
 */

namespace Home\Controller;
use Think\Controller;

class ExpertController extends Controller
{
    /**
     * 专家团队
     * @author 佛祖<381361943@qq.com>
     */
    public function index()
    {
        $page = I('p',1);
        $list = $this->paging($page,M('expert'),12);
        $this->assign('list',$list['list']);
        $this->assign('page',$list['page']);
        $this->display();
    }
    /**
     * 专家团队详情
     * @author 佛祖<381361943@qq.com>
     */
    public function detail()
    {
        $id = I('id');
        $detail = M('expert')->find($id);
        if(!$detail)
            $this->error('页面错误');
        $this->assign('detail',$detail);
        $this->display();
    }
}